<?php
    class Forum extends Controller {
	
	function index() {
	    
	    // login
	    $logged_in_user = &unserialize($this->session->userdata('logged_in_user'));
	    if (is_object($logged_in_user)) $this->user_model->updateActivity($logged_in_user->id);
	    $username = $this->session->flashdata('username');
	    $login_message = $this->session->flashdata('login_message');
	    
	    $header_data = array(
		'page_title' => 'Fórum',
		'logged_in_user' => $logged_in_user,
		'username' => $username,
		'login_message' => $login_message,
		'controller' => 'forum'
	    );
	    
	    $footer_data = array();
	    
	    $content_data = array();
	    
	    $this->load->view('base/header.php', $header_data);
	    $this->load->view('news/index.php', $content_data);
	    $this->load->view('base/footer.php', $footer_data);
	}
    }
?>